﻿using System.Data.Entity.ModelConfiguration;

namespace Home.Domain.Entities.Mapping
{
    public class NewsMap : EntityTypeConfiguration<News>
    {
        public NewsMap()
        {
            Property(t => t.Body)
                .IsRequired();
            Property(t => t.Description)
                .HasMaxLength(250);
            Property(t => t.Tags)
                .HasMaxLength(200);
            Property(t => t.Source)
                .HasMaxLength(200);
            Property(t => t.Title)
                .HasMaxLength(64);
        }
    }
}
